c<head>
<!-- jQuery -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

<!-- required plugins -->
<script type="text/javascript" src="scripts/date.js"></script>
<!--[if IE]><script type="text/javascript" src="scripts/jquery.bgiframe.js"></script><![endif]-->

<!-- jquery.datePicker.js -->
<script type="text/javascript" src="scripts/jquery.datePicker.js"></script>
<script type="text/javascript" src="scripts/jquery.selectlist.min.js"></script>
<script type="text/javascript" src="scripts/jquery.selectlist.pack.js"></script>

		<script type="text/javascript" charset="utf-8">
            $(function()
            {
				$('.date-pick').datePicker({autoFocusNextInput: true});
            });
		</script>
<script type="text/javascript">  $(document).ready(function () { $('select#services').selectList(); }); </script>		
<script type="text/javascript">
function getSelects()
{
document.write('getselects');
	var sl = $('select#services').selectList({ instance: true });
	var items = sl.val();
	for (x in items)
		document.write(items[x]);	
}
 </script>
   <script type="text/javascript">  
   $().ready(function() {  
    $('#add').click(function() {  
     return !$('#services2id option:selected').remove().appendTo('#services2selected');  
    });  
    $('#remove').click(function() {  
     return !$('#services2selected option:selected').remove().appendTo('#services2id');  
    });  
   });  
  </script> 
<link rel="stylesheet" type="text/css" media="screen" href="styles/datePicker.css">
<link rel="stylesheet" type="text/css" media="screen" href="styles/demo.css">
  <link rel="stylesheet" type="text/css" href="styles/selectlist.css" />

</head>

	<body onload-"getSelects()">
<?php
function isServiceSelected($option)
{
@$service=$_POST['services2'];
if(is_array($service))
{
	while (list ($key, $val) = each($service))
	{
		if ($val == $option) echo 'selected';
	}
}	
}
?>
        <div id="container">

            <h1>jquery.datePicker example: simple datePicker</h1>
			<p><a href="index.html">&lt; date picker home</a></p>
            <p>
                The following example displays simple use of the datePicker component to select a date for
				input fields.
            </p>
			<form name="chooseDateForm" action="#" method="post">
				<fieldset>
					<legend>Test date picker form</legend>

                    <ol>
                        <li>
                            <label for="date1">Date 1:</label>
							<input name="date1" id="date1" class="date-pick" />
						</li>
                        <li>
                            <label for="date2">Date 2:</label>
							<input name="date2" id="date2" class="date-pick" />

						</li>
                        <li>
                            <label for="test-select">Test select:</label>
                            <select name="test-select" id="test-select" style="width: 170px">
                                <option value="1">Test SELECT </option>
                                <option value="2">Doesn't shine through</option>
                                <option value="3">Even in IE</option>

                                <option value="4">Yay!</option>
                            </select>
                        </li>
					</ol>
				</fieldset>
<select name='services' id='services' multiple="multiple">
<option value="airtrans"> Airport Service</option>
<option value="wedding"> Weddings</option>
<option value="prom"> Prom</option>
<option value="bachelor"> Bachelor(ette) Party</option>
<option value="anniversaries"> Anniversaries</option>
<option value="pt2pt"> Point 2 Point</option>
<option value="birthday"> Birthday Parties</option>
<option value="concert"> Concerts</option>
<option value="grads"> Graduation</option>
<option value="sports"> Sports Events</option>
<option value="holiday"> Holiday Light Tours</option>
<option value="nightout"> Night on the Town</option>
<option value="other"> Other</option>
</select>	

			<select name='services2[]' id='services2id' size="13" multiple="multiple">
<option value="airtrans" <?php isSelected('airtrans'); ?>> Airport Service</option>
<option value="wedding" <?php isSelected('wedding'); ?>> Weddings</option>
<option value="prom" <?php isSelected('prom'); ?>> Prom</option>
<option value="bachelor" <?php isSelected('bachelor'); ?>> Bachelor(ette) Party</option>
<option value="anniversaries" <?php isSelected('anniversaries'); ?>> Anniversaries</option>
<option value="pt2pt" <?php isSelected('pt2pt'); ?>> Point 2 Point</option>
<option value="birthday" <?php isSelected('birthday'); ?>> Birthday Parties</option>
<option value="concert" <?php isSelected('concert'); ?>> Concerts</option>
<option value="grads" <?php isSelected('grads'); ?>> Graduation</option>
<option value="sports" <?php isSelected('sports'); ?>> Sports Events</option>
<option value="holiday" <?php isSelected('holiday'); ?>> Holiday Light Tours</option>
<option value="nightout"<?php isSelected('nightout'); ?>> Night on the Town</option>
<option value="other" <?php isSelected('other'); ?>> Other</option>
</select>
 <a href="#" id="add">add &gt;&gt;</a> 
<select multiple id="services2selected"></select>
<a href="#" id="remove">&lt;&lt; remove</a> 	
<input  type="submit"  value="go">
<input type="button" onclick="getSelects()'>
			</form>		

        </div>
<?php
echo 'start';
@$service=$_POST['services2'];
echo $service.gettype() . ' service<br>';
echo $service[0].gettype() . ' element<br>';
if(is_array($service))
{
	while (list ($key, $val) = each($service))
	{
		echo "key: $key <br>val: $val <br>";
	}
}
else{echo $service;}
echo $service;
/*
$service=$_POST['service'];
if ($service)
{
    echo date(); 
    foreach($service as $srv)
        echo $srv;
}*/
echo 'here';
?>		
	</body>
</html>